.search-pop-overlay {
  background: rgba(0, 0, 0, 0);
  height: 100%;
  left: 0;
  position: fixed;
  top: 0;
  transition: visibility 0s linear .2s, background .2s;
  visibility: hidden;
  width: 100%;
  z-index: 1400;

  &.search-active {
    background: rgba(0, 0, 0, .3);
    transition: background .2s;
    visibility: visible;
  }
}

.search-popup {
  background: #f5f5f5;
  border-radius: 5px;
  height: 80%;
  left: calc(50% - 350px);
  position: fixed;
  top: 10%;
  transform: scale(0);
  transition: transform .2s;
  width: 700px;
  z-index: 1500;

  .search-active & {
    transform: scale(1);
  }

  +mobile() {
    border-radius: 0;
    height: 100%;
    left: 0;
    margin: 0;
    top: 0;
    width: 100%;
  }

  .search-icon, .popup-btn-close {
    color: #999;
    font-size: 18px;
    padding: 0 10px;
  }

  .popup-btn-close {
    cursor: pointer;

    &:hover .fa {
      color: #222;
    }
  }

  .search-header {
    background: #eee;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    padding: 5px;
  }

  input.search-input {
    background: transparent;
    border: 0;
    outline: 0;
    width: 100%;

    &::-webkit-search-cancel-button {
      display: none;
    }
  }
}

if (hexo-config('local_search.enable')) {
  .search-popup {
    .search-input-container {
      flex-grow: 1;
      padding: 2px;
    }

    ul.search-result-list {
      margin: 0 5px;
      padding: 0;
      width: 100%;
    }


    li.search-result-element {
      padding: 10px 0px 10px 0px;
    }

    p.search-result {
      border-bottom: 1px;
      padding: 3px 0px 0px 0px;
      color: #34495e;
    }

    a.search-result-title {
      font-weight: bold;
      color: #34495e;
    }

    .search-keyword {
      border-bottom: 1px dashed #ff2a2a;
      color: #ff2a2a;
      font-weight: bold;
    }

    #search-result {
      display: flex;
      height: calc(100% - 55px);
      overflow: auto;
      padding: 5px 25px;
    }

    #no-result {
      color: #ccc;
      margin: auto;
    }
  }
  
  li.menu-item.menu-item-search.right-list {
    padding: 10px;
  }
}